home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / basic / aa_array.zip / DESCRIB.TXT < prev    next >
Text File  |  1994-12-19  |  5KB  |  119 lines

  1.  
  2.      AA-Array.DLL manages the creation, accessing, saving to and
  3.      restoring from disk (persistence) of extended arrays. The size of
  4.      these extended arrays is only limited by the amount of virtual
  5.      memory on your computer. Extended arrays have one column, hence
  6.      are lists of elements. Extended arrays do  not have the normal
  7.      Visual Basic (<32,767 elements and <64,000 bytes of string space)
  8.      limits. Extended arrays can have any number of elements up to 4
  9.      Gigs and use any amount of string space.
  10.  
  11.      Data types of an extended array element can be: Integer, Long,
  12.      Single, Double, Currency, or String. In the registered version,
  13.      array elements can be of User defined types. AA-Array optimizes
  14.      access to and storage of sparse arrays (i.e. arrays that have many
  15.      possible elements, but few element have anything in them).
  16.  
  17.      AA-ARRAY.DLL is distributed as Shareware. Try before you buy. If
  18.      you continue using it, you are expected to register. See AA-
  19.      ARRAY.HLP for information on the benefits of registering. See
  20.      ORDER.TXT for information on how to register.
  21.  
  22.         AA-Software International
  23.         12 ter Domaine Du Bois Joli
  24.         06330 Roquefort-Les-Pins, France
  25.         Tel: (+33) 93.77.50.47
  26.         Fax: (+33) 93.77.19.78
  27.         Internet: cswilly@acm.org
  28.         CompuServe: 100343,2570
  29.         X400:     (C=US; A=CompuServe; P=csmail; D=ID:100343,2570)
  30.  
  31.  
  32.      To use a sort routine in AA-Array.DLL, first make sure the DLL can
  33.      be found on the DOS path or is in the Windows or System directory.
  34.      All the routines are as easy to use as the following example.
  35.  
  36.         'Make sure the file AA-ARRAY.DLL is in your DOS Path
  37.         'Put the lines below in the declaration section of a form
  38.         Declare Function AryOpenString Lib "AA-Array.dll" (
  39.              ByVal aryName_s As String, ByVal mode As Integer,
  40.              ByVal password_s As String) As Integer
  41.         Declare Function AryClose Lib "AA-Array.dll" (
  42.              ByVal ary_h As Integer) As Integer
  43.         Declare Sub ArySetBounds Lib "AA-Array.dll" (
  44.              ByVal ary_h As Integer, ByVal minElement As Long,
  45.              ByVal maxElement As Long)
  46.         Declare Sub AryGetBounds Lib "AA-Array.dll" (
  47.              ByVal ary_h As Integer, minElement As Long, maxElement As
  48.              Long)
  49.         Declare Sub ArySetString Lib "AA-Array.dll" (
  50.              ByVal ary_h As Integer, ByVal row_l As Long, value As String)
  51.         Declare Sub AryGetString Lib "AA-Array.dll" (
  52.              ByVal ary_h As Integer, ByVal row_l As Long, value As String)
  53.  
  54.  
  55.         ' Put the following in the startup for a form
  56.  
  57.         'Create extended string array
  58.         Dim strAry_h As Integer
  59.         strAry_h = AryOpenString("c:\tstStr.ary",
  60.              AryCreateNew + AryPersistent, "")
  61.         If strAry_h < 0 Then
  62.            Me.Print "Cannot create extended array."
  63.            Me.Print "Error code is: "; strAry_h
  64.            Exit Sub
  65.         End If
  66.  
  67.         'Set the array's lower and upper bounds
  68.         'Bounds can be from -2,147,483,648 to +2,147,483,647
  69.         Const firstElement = 2147483547
  70.         ArySetBounds strAry_h, firstElement, firstElement + 100
  71.  
  72.         'Set the odd elements.
  73.         'Even are not set and do not use extra memory
  74.         Dim dummyString As String
  75.         dummyString = Space(1311)
  76.         Dim i As Long
  77.         For i = firstElement To firstElement + 100 Step 2
  78.            ArySetString strAry_h, i, Str$(i) & dummyString
  79.         Next i
  80.  
  81.         'Close the extended array and free up memory
  82.         Dim retval As Integer
  83.         retval = AryClose(strAry_h)
  84.         If retval < 0 Then
  85.            Me.Print "Cannot write extended array to disk."
  86.            Me.Print "Error code is: "; strAry_h
  87.            Exit Sub
  88.         End If
  89.  
  90.         'Open extended string array
  91.         strAry_h = AryOpenString("c:\tstStr.ary",
  92.              AryUseExisting + AryPersistent, "")
  93.         If strAry_h < 0 Then
  94.            Me.Print "Cannot open extended array."
  95.            Me.Print "Error code is: "; strAry_h
  96.            Exit Sub
  97.         End If
  98.  
  99.         'Get the array's lower and upper bounds
  100.         Dim lowerBound As Long
  101.         Dim upperBound As Long
  102.         AryGetBounds strAry_h, lowerBound, upperBound
  103.         Me.Print lowerBound, upperBound
  104.  
  105.         'Get the every element (even elements will be null strings)
  106.         Dim retString As String
  107.         For i = lowerBound To upperBound
  108.            AryGetString strAry_h, i, retString
  109.            Me.Print i, Trim$(retString)
  110.         Next i
  111.  
  112.         'Close extended array and free up memory
  113.         retval = AryClose(strAry_h)
  114.         If retval < 0 Then
  115.            Me.Print "Cannot write extended array to disk."
  116.            Me.Print "Error code is: "; strAry_h
  117.            Exit Sub
  118.         End If
  119.